home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-10-12 | 3.7 KB | 167 lines | [TEXT/PJMM] |
- unit Controls;
-
- { Pascal Interface to the Macintosh Libraries }
-
- { Copyright © Apple Computer Inc. }
- { All Rights Reserved }
-
- { Adapted for use with THINK Pascal 4.0.x by Marco Piovanelli }
-
- interface
- uses
- Types;
-
- type
-
- ControlPartCode = UInt8;
- ControlHiliteValue = UInt8;
-
- const
- kControlNoPart = 0;
- kControlLabelPart = 1;
- kControlMenuPart = 2;
- kControlTrianglePart = 4;
- kControlButtonPart = 10;
- kControlCheckBoxPart = 11;
- kControlRadioButtonPart = 11;
- kControlUpButtonPart = 20;
- kControlDownButtonPart = 21;
- kControlPageUpPart = 22;
- kControlPageDownPart = 23;
- kControlIndicatorPart = 129;
- kControlDisabledPart = 254;
- kControlInactivePart = 255;
-
- kControlCheckboxUncheckedValue = 0;
- kControlCheckboxCheckedValue = 1;
- kControlCheckboxMixedValue = 2;
-
- kControlRadioButtonUncheckedValue = 0;
- kControlRadioButtonCheckedValue = 1;
- kControlRadioButtonMixedValue = 2;
-
- type
-
- ControlDefProcMessage = SInt16;
-
- const
-
- drawCntl = 0;
- testCntl = 1;
- calcCRgns = 2;
- initCntl = 3;
- dispCntl = 4;
- posCntl = 5;
- thumbCntl = 6;
- dragCntl = 7;
- autoTrack = 8;
- calcCntlRgn = 10;
- calcThumbRgn = 11;
- drawThumbOutline = 12;
-
- { Control color table part codes}
- cFrameColor = 0;
- cBodyColor = 1;
- cTextColor = 2;
- cThumbColor = 3;
-
- type
- ControlRef = ControlHandle;
-
- ControlDefProcPtr = ProcPtr; { FUNCTION ControlDef(varCode: INTEGER; theControl: ControlRef; message: INTEGER; param: LONGINT): LONGINT; }
- ControlActionProcPtr = ProcPtr; { PROCEDURE ControlAction(theControl: ControlRef; partCode: INTEGER); }
- ControlDefUPP = UniversalProcPtr;
- ControlActionUPP = UniversalProcPtr;
-
- const
- uppControlDefProcInfo = $00003BB0; { FUNCTION (2 byte param, 4 byte param, 2 byte param, 4 byte param): 4 byte result; }
- uppControlActionProcInfo = $000002C0; { PROCEDURE (4 byte param, 2 byte param); }
-
- function NewControlDefProc (userRoutine: ControlDefProcPtr): ControlDefUPP;
- inline
- $2E9F;
-
- function NewControlActionProc (userRoutine: ControlActionProcPtr): ControlActionUPP;
- inline
- $2E9F;
-
- function CallControlDefProc (varCode: INTEGER;
- theControl: ControlRef;
- message: INTEGER;
- param: LONGINT;
- userRoutine: ControlDefUPP): LONGINT;
- inline
- $205F, $4E90;
-
- procedure CallControlActionProc (theControl: ControlRef;
- partCode: INTEGER;
- userRoutine: ControlActionUPP);
- inline
- $205F, $4E90;
-
- procedure SetControlTitle (theControl: ControlRef;
- title: ConstStr255Param);
- inline
- $A95F;
-
- procedure GetControlTitle (theControl: ControlRef;
- var title: Str255);
- inline
- $A95E;
-
- procedure SetControlValue (theControl: ControlRef;
- theValue: INTEGER);
- inline
- $A963;
-
- function GetControlValue (theControl: ControlRef): INTEGER;
- inline
- $A960;
-
- procedure SetControlMinimum (theControl: ControlRef;
- minValue: INTEGER);
- inline
- $A964;
-
- function GetControlMinimum (theControl: ControlRef): INTEGER;
- inline
- $A961;
-
- procedure SetControlMaximum (theControl: ControlRef;
- maxValue: INTEGER);
- inline
- $A965;
-
- function GetControlMaximum (theControl: ControlRef): INTEGER;
- inline
- $A962;
-
- procedure SetControlReference (theControl: ControlRef;
- data: LONGINT);
- inline
- $A95B;
-
- function GetControlReference (theControl: ControlRef): LONGINT;
- inline
- $A95A;
-
- procedure SetControlAction (theControl: ControlRef;
- actionProc: ControlActionUPP);
- inline
- $A96B;
-
- function GetControlAction (theControl: ControlRef): ControlActionUPP;
- inline
- $A96A;
-
- procedure SetControlColor (theControl: ControlRef;
- newColorTable: CCTabHandle);
- inline
- $AA43;
-
- function GetControlVariant (theControl: ControlRef): INTEGER;
- inline
- $A809;
-
- implementation
- end.